Skip to content

docs: add Android deprecated API removals to Capacitor 9 upgrade guide - #581

Merged
andredestro merged 4 commits into
chore/RMET-5303-cap9-ios-deprecated-apisfrom
chore/RMET-5304-cap9-android-deprecated-apis
Aug 20, 2026
Merged

docs: add Android deprecated API removals to Capacitor 9 upgrade guide#581
andredestro merged 4 commits into
chore/RMET-5303-cap9-ios-deprecated-apisfrom
chore/RMET-5304-cap9-android-deprecated-apis

Conversation

@andredestro

@andredestro andredestro commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the "Breaking changes in @capacitor/android" section to the "Updating to 9.0" upgrade guide (docs/main/updating/9-0.md) and registers the page in the Upgrade Guides sidebar.

The section covers the Java APIs removed in Capacitor 9 (deprecated in previous majors), with a replacement table for each: the legacy CapConfig constructor and generic accessors, PluginCall.save()/isSaved()/hasOption()/isReleased(), Bridge.CAPACITOR_HTTPS_INTERCEPTOR_START, Plugin.getConfigValue(String) and the deprecated MessageHandler constructor.

Change Type

  • Fix
  • Feature
  • Refactor
  • Breaking Change
  • Documentation
  • Other (CI, chores, etc.)

Rationale / Problems Fixed

Capacitor 9 removes the Android APIs that were deprecated in previous major versions (see ionic-team/capacitor#8553). Plugin authors and app developers hitting compile errors after upgrading need a single place that maps each removed API to its replacement (RMET-5304).

The legacy @NativePlugin ecosystem is not covered here because it is intentionally kept in Capacitor 9 for now; its removal is being evaluated separately.

Tests or Reproductions

Content was verified against the actual removals in ionic-team/capacitor#8553: every removed symbol listed in the guide matches the source changes, and the replacements were validated by building and running the capacitor-testapp against that branch.

Platforms Affected

  • Android
  • iOS
  • Web

Notes / Comments

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
capacitor-docs Ready Ready Preview Aug 20, 2026 12:55pm

Request Review

Comment thread docs/main/updating/9-0.md
@andredestro
andredestro marked this pull request as ready for review August 19, 2026 16:05
…ted-apis' into chore/RMET-5304-cap9-android-deprecated-apis

# Conflicts:
#	docs/main/updating/9-0.md
#	sidebars.js
Comment thread docs/main/updating/9-0.md Outdated
Comment on lines +64 to +77
Capacitor 9 also removes the Java APIs that were deprecated in previous major versions. If your app or plugin still uses any of them, replace them as follows.

| Removed | Replacement |
| :------ | :---------- |
| `CapConfig(AssetManager, JSONObject)` constructor | `CapConfig.loadDefault(Context)` to load from `capacitor.config.json`, or `CapConfig.Builder` for embedded use |
| `CapConfig.getObject(String)`, `getString(...)`, `getBoolean(...)`, `getInt(...)`, `getArray(...)` | The typed getters on `CapConfig` for main config values and the `PluginConfig` accessors for plugin config values |
| `PluginCall.save()` | `setKeepAlive(true)` |
| `PluginCall.isSaved()` | `isKeptAlive()` |
| `PluginCall.hasOption(String)` | Typed accessors (`getString(...)`, `getInt(...)`, etc.) |
| `PluginCall.isReleased()` | No replacement, released calls are managed by the bridge |
| `Bridge.CAPACITOR_HTTPS_INTERCEPTOR_START` | `CAPACITOR_HTTP_INTERCEPTOR_START`, all proxied requests are handled by it |
| `Plugin.getConfigValue(String)` | `getConfig()` and the typed accessors on `PluginConfig` |
| `MessageHandler(Bridge, WebView, Object)` constructor | `MessageHandler(Bridge, WebView)` |
| `WebViewLocalServer.PathHandler.getResponseHeaders()` | `buildDefaultResponseHeaders()` |

@OS-pedrogustavobilro OS-pedrogustavobilro Aug 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment applies to this PR and #580.

I wonder if it makes more sense to state these changes in the updating plugins guide, as these APIs would be accessed by plugins, not Capacitor apps, right? It's what we did with #586

Let me know if you agree or think that it's best to leave here, or maybe some other option (leave some in this guide and some in plugins; link from one guide to the next so that information is at least mentioned in both guides?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mostly agree. The Android entries are all plugin-author or embedding APIs, so those fit the plugins guide, consistent with #586. The iOS table has a few app-facing entries though: CAPBridge.handleOpenUrl(_:_:), handleContinueActivity(_:_:) and the status bar notifications were used directly in app code (older deep links docs recommended it).
So I'd go with your cross-link option: move both tables to the plugins guide under "Breaking changes in code" from #586, and keep one sentence in the app guide linking there, noting that apps with custom native code should check that list too.
If that works for you, I'll apply it to both PRs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me!

@OS-pedrogustavobilro OS-pedrogustavobilro self-assigned this Aug 20, 2026
Per PR review feedback, the removed APIs are mostly plugin-author
facing, so the table now lives in the plugins guide with a pointer
from the app guide for apps with custom native code.
@andredestro
andredestro merged commit b5f9b9a into main Aug 20, 2026
2 checks passed
@andredestro
andredestro deleted the chore/RMET-5304-cap9-android-deprecated-apis branch August 20, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants